package com.yj.springbootaop.dao;

import com.yj.springbootaop.entity.SysLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class SysLogDaoImpl implements SysLogDao {


    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Override
    public void save(SysLog sysLog) {
        String sql = "insert into sys_log values(?,?,?,?,?,?,?,?)";
        jdbcTemplate.update(sql,sysLog.getId(),sysLog.getUsername(),sysLog.getOperation(),sysLog.getTime(),sysLog.getMethod(),sysLog.getParams(),sysLog.getIp(),sysLog.getCreateTime());
    }
}
